# the minimum version of CMake.
cmake_minimum_required(VERSION 3.13.0)
project(tar)
include(cmake/clone-repo.cmake)
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

clone_repo(ctar https://gitcode.com/liyanqing14/tar.git master)
clone_repo(boundscheck https://gitee.com/openharmony/third_party_bounds_checking_function.git master)

add_subdirectory(third_party)

add_library(jtar_ffi SHARED tar_ffi.cpp)
target_link_libraries(jtar_ffi PUBLIC libace_napi.z.so)
target_link_libraries(jtar_ffi PUBLIC ctar)
